﻿<?php
@header('Content-type: text/html; charset=utf-8');
/*$html = file_get_contents('http://www.aiyooyoo.com/');
print_r($http_response_header);
$fp = fopen('http://www.aiyooyoo.com/', 'r');
print_r(stream_get_meta_data($fp));
fclose($fp);*/
$data = array ('author' => '白菜大侠','mail'=>'info@aiyooyoo.com','text'=>'博主很给力。');
$data = http_build_query($data);
$opts = array (
 'http'=>array(   
'method' => 'POST',
'header'=> "Content-type: application/x-www-form-urlencoded\r\n" .
 "Content-Length: " . strlen($data) . "\r\n",
 'content' => $data)
);
$context = stream_context_create($opts);
$html = @file_get_contents('http://typecho.com/index.php/archives/17/comment', false, $context);
echo $html;
/**
Host: aiyooyoo.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; zh-CN; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,**;q=0.8
Accept-Language: zh-cn,zh;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: GB2312,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: http://typecho.com/index.php/archives/17/
Cookie: PHPSESSID=15vg6jsbbj5n0cjlg7pbioai85; cnzz_a2340027=6; sin2340027=; rtime=0; ltime=1292412981687; cnzz_eid=47931497-1292410421-
Content-Type: application/x-www-form-urlencoded Content-Length: 79 author=%E7%99%BD%E8%8F%9C&mail=info%40aiyooyoo.com&url=&text=%E6%B5%8B%E8%AF%95


**/